import type { SuccessData } from '../types'

export type CourseModel = {
  id: number
  name: string
  description: string
}

export type ExperimentMetaModel = {
  id: number
  index: number
  meta: string
}

export type ExperimentModel = {
  id: number
  name: string
  description: string
}

type SearchCoursePayload = Partial<CourseModel>
type SearchCourseData = SuccessData<CourseModel[]>

type GetCourseExperimentsData = SuccessData<ExperimentModel[]>

type GetCourseDetailData = SuccessData<
  CourseModel & {
    experiments: ExperimentModel[]
    experimentMeta: ExperimentMetaModel[]
  }
>

export type { GetCourseDetailData, GetCourseExperimentsData, SearchCoursePayload, SearchCourseData }
